<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>修改到货单</title>
<link href="<%=path%>/css/style_min.css" rel="stylesheet"
	type="text/css" />
<link href="<%=path%>/css/core.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/form.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/list.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/SupplierSelect.css" rel="stylesheet"
	type="text/css" />
<link href="<%=path%>/css/UsersSelect.css" rel="stylesheet"
	type="text/css" />
<link href="<%=path%>/css/xWindowPanel.css" rel="stylesheet"
	type="text/css" />
<link href="<%=path%>/css/xToolbar.css" rel="stylesheet" type="text/css" />
<style type="text/css">
input {
	width: 180px;
}

textarea {
	width: 503px;
	height: 40px;
}

select {
	width: 188px;
}

.n {
	text-align: right;
}

.required {
	color: red;
}
</style>
</head>
<body>
	<form name="inOrderForm" id="inOrderForm"
		action="<%=path%>/stock/inOrder/update.t4m" class="form" method="post">
		<div class="form-group">基本信息</div>
		<table class="form-table" cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<td class="form-left"><span class="form-required">*</span>入库单号</td>
				<td class="form-right"><s:textfield name="inOrder.code"
						cssClass="text required"></s:textfield></td>
				<td class="form-left"><span class="form-required">*</span>入库时间</td>
				<td class="form-right"><input type="text"
					name="inOrder.inStockDate" class="text Wtime required"
					onfocus="new WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'});"
					value="<s:date name="inOrder.inStockDate" format="yyyy-MM-dd HH:mm"/>" />
				</td>
			</tr>
			<tr>
				<s:if test="inOrder.arriveOrder.code != ''">
					<td class="form-left">到货日期</td>
					<td class="form-right"><s:date
							name="inOrder.arriveOrder.orderDate" format="yyyy-MM-dd" />
					</td>
					<td class="form-left">到货单号</td>
					<td class="form-right"><s:property
							value="inOrder.arriveOrder.code" />
					</td>
				</s:if><s:else>
					<td class="form-left">退货日期</td>
					<td class="form-right"><s:date
							name="inOrder.salesBackOrder.backDate" format="yyyy-MM-dd" />
					</td>
					<td class="form-left">退货单号</td>
					<td class="form-right"><s:property
							value="inOrder.salesBackOrder.code" />
					</td>
				</s:else>
			</tr>
			<tr>
				<td class="form-left">经办人</td>
				<td class="form-right" colspan="3"><s:property
						value="inOrder.creator.realName" />
				</td>
			</tr>
			<tr>
				<td class="form-left">备注</td>
				<td class="form-right" colspan="3"><s:textarea
						name="inOrder.remark" cssClass="textarea"></s:textarea></td>
			</tr>
		</table>
		<div class="form-group">入库明细</div>
		<table id="titleTable" cellpadding="0" cellspacing="0">
			<tr>
				<td>货品编号</td>
				<td>货品名称</td>
				<td>规格型号</td>
				<td>到货数量</td>
				<td>仓库选择</td>
				<td><span class="form-required">*</span>入库数量</td>
			</tr>
		</table>
      <div style="overflow-y: scroll;height: 160px">
		<table id="dataTable" cellpadding="0" cellspacing="0">
			<s:iterator id="iop" value="iopList" status="i">
				<tr class="row">
					<td><span><s:property value="#iop.product.code"
								default="&nbsp;" />
					</span>
					</td>
					<td><span><s:property value="#iop.product.name"
								default="&nbsp;" />
					</span>
					</td>
					<td><span><s:property value="#iop.product.standard"
								default="&nbsp;" />
					</span>
					</td>
					<td align="right"><span><s:property
								value="#iop.arriveAmounts" default="&nbsp;" />
					</span>
					</td>
					<td><s:select list="warehouseList" listKey="id"
							listValue="name" name="houseIdList" cssStyle="width:87px"></s:select>
					</td>
					<td><input type="text" class="text n required"
						name="amountsList" value="<s:property value="#iop.inAmounts"/>"
						style="width: 76px;" /> <input type="hidden" name="iopIdList"
						value="<s:property value="#iop.id"/>" /></td>
				</tr>
			</s:iterator>
		</table>
      </div>
		<s:hidden name="inOrder.auditState" />
		<s:hidden name="inOrder.auditor.id" />
		<s:hidden name="inOrder.id"></s:hidden>
		<s:hidden name="tabId" />
		<s:hidden name="windowPanelId" />
	</form>
	<script src="<%=path%>/js/prototype_for_validation.js"
		type="text/javascript"></script>
	<script src="<%=path%>/js/validation_cn.js" type="text/javascript"></script>
	<script src="<%=path%>/js/core.js" type="text/javascript"></script>
	<script src="<%=path%>/js/share.js" type="text/javascript"></script>
	<script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
	<script src="<%=path%>/js/Validate.js" type="text/javascript"></script>
	<script src="<%=path%>/js/datePicker/WdatePicker.js"
		type="text/javascript"></script>
	<script src="<%=path%>/js/Grid.js" type="text/javascript"></script>
	<script src="<%=path%>/js/jquery-impromptu.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			var valid = new Validation('inOrderForm', {
				immediate : true
			});
			new Grid({
				titleTable : 'titleTable',
				dataTable : 'dataTable',
				widths : [ 120, 120, 90, 80, 90, 80 ],
				height : 268
			});

			loadReady();
		});
	</script>
</body>
</html>